home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 001 / pibt3sp3.arc / PROCESSC.PAS < prev    next >
Pascal/Delphi Source File  |  1985-09-07  |  5KB  |  76 lines

  1. (*----------------------------------------------------------------------*)
  2. (*           Process_Command --- Process PibTerm  command               *)
  3. (*----------------------------------------------------------------------*)
  4.  
  5. PROCEDURE Process_Command;
  6.  
  7. (*----------------------------------------------------------------------*)
  8. (*                                                                      *)
  9. (*     Procedure:  Process_Command                                      *)
  10. (*                                                                      *)
  11. (*     Purpose:    Process PibTerm Command escape sequence              *)
  12. (*                                                                      *)
  13. (*     Calling Sequence:                                                *)
  14. (*                                                                      *)
  15. (*        Process_Command(     VAR Ch  : CHAR;                          *)
  16. (*                             Use_Ch  : BOOLEAN;                       *)
  17. (*                         VAR Command : PibTerm_Command_Type );        *)
  18. (*                                                                      *)
  19. (*           Done    --- set TRUE if termination command (Alt-X) found  *)
  20. (*           Ch      --- character following ESC                        *)
  21. (*           Use_Ch  --- TRUE if Ch on entry is char following ESC,     *)
  22. (*                       FALSE if Ch to be read here.                   *)
  23. (*           Command --- Command to be executed                         *)
  24. (*                                                                      *)
  25. (*      Remarks:                                                        *)
  26. (*                                                                      *)
  27. (*         All PibTerm commands are implemented as escape sequences,    *)
  28. (*         very much like PC-TALK or QMODEM.  The available commands    *)
  29. (*         are:                                                         *)
  30. (*                                                                      *)
  31. (*            Alt-A:  Alter (block) mode                                *)
  32. (*            Alt-B:  Send Break                                        *)
  33. (*            Alt-C:  Clear Screen                                      *)
  34. (*            Alt-D:  Dial a number                                     *)
  35. (*            Alt-E:  Turn local echo ON/OFF                            *)
  36. (*            Alt-F:  File manipulation                                 *)
  37. (*            Alt-G:  Gossip (chat) mode                                *)
  38. (*            Alt-H:  Hang up the phone                                 *)
  39. (*            Alt-I:  Display program information (help)                *)
  40. (*            Alt-J:  Jump to DOS                                       *)
  41. (*            Alt-K:  Set function keys                                 *)
  42. (*            Alt-L:  Log session to printer                            *)
  43. (*            Alt-M:  Toggle Mute/Sound Mode                            *)
  44. (*            Alt-N:  New communications params                         *)
  45. (*            Alt-O:  Output session to disk                            *)
  46. (*            Alt-P:  Set communications parameters                     *)
  47. (*            Alt-Q:  Redial last number dialed                         *)
  48. (*            Alt-R:  Receive a file from remote                        *)
  49. (*            Alt-S:  Send file to remote                               *)
  50. (*            Alt-T:  Set up translate table                            *)
  51. (*            Alt-U:  Screen dump                                       *)
  52. (*            Alt-V:  Review captured text                              *)
  53. (*            Alt-W:  Set host mode (wait for call)                     *)
  54. (*            Alt-X:  Leave Program                                     *)
  55. (*            Alt-Y:  Examine timers                                    *)
  56. (*            Alt-Z:  Area code search                                  *)
  57. (*                                                                      *)
  58. (*----------------------------------------------------------------------*)
  59.  
  60. BEGIN (* Process_Command *)
  61.                                    (* Pick up character following escape *)
  62.    IF ( NOT Use_Ch ) THEN
  63.       READ( Kbd , Ch );
  64.                                    (* Remember it                        *)
  65.    Key_No  := ORD( Ch );
  66.                                    (* Get corresponding command type     *)
  67.  
  68.    Command := PibTerm_Command_Table[ Key_No ];
  69.  
  70.                                    (* Ensure script strings are null     *)
  71.    Script_String    := '';
  72.    Script_String_2  := '';
  73.    Script_Integer_1 := 0;
  74.  
  75. END   (* Process_Command *);
  76.